package com.capacitydorm.server.web;

import com.capacitydorm.server.common.vo.SelectAllTowerVo;
import com.capacitydorm.server.service.TowerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("all")
public class AllController {
    @Autowired
    private TowerService towerService;

    @RequestMapping("/selectAll")
    public ResponseEntity<List<SelectAllTowerVo>> getAllStudent() {
        List<SelectAllTowerVo> allStudent = towerService.getAllStudent();
        return new ResponseEntity<>(allStudent, HttpStatus.OK);
    }

}
